﻿using DataModels.Enums.House;
using SqlSugar;

namespace DataModels.Entities.House
{
    [SugarTable("housinguserrelation")]
    public class HousingUserRelation
    {
        /// <summary>
        /// 关系ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public Guid UUID { get; set; } = Guid.NewGuid();

        /// <summary>
        /// 房屋ID
        /// </summary>
        public Guid HouseUUID { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public Guid UserUUID { get; set; }

        /// <summary>
        /// 关系类型
        /// </summary>
        public HousingUserRelationType RelationType { get; set; }

        /// <summary>
        /// 关系状态
        /// </summary>
        public HousingUserRelationStatus Status { get; set; } = HousingUserRelationStatus.Active;

        /// <summary>
        /// 开始日期
        /// </summary>
        public DateTime StartDate { get; set; }

        /// <summary>
        /// 结束日期（可为空，表示永久关系）
        /// </summary>
        public DateTime? EndDate { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; } = DateTime.Now;

    }
}
